<?php 
/**
 * 
 */

$target = "uploads/"; 
$target = $target . basename( $_FILES['uploaded']['name']) ; 
$ok = 1; 
$refresh = "";
	if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
	{
		header('Refresh: 2; URL=/lab2/');
		echo "<h2>Filen <b>". basename( $_FILES['uploaded']['name']). "</b> har laddats upp!</h2>";
	} 
	else {
		header('Refresh: 2; URL=/lab2/');
		echo "<h1>ERROR, Det gick inte att ladda upp din fil!</h1>";
	}
	

	